<?php
require_once 'pages/TMSFrontPage.inc';

class TMSFrontSystemPage extends TMSFrontPage {
	private $_worker_;
	
	public function __construct($path, $filename, TIntrinsicPageService $service){		
		parent::__construct($path, $filename, $service);
	}
	
	public function __set($nm,$value){
		switch ($nm){
			case 'Worker':{
				switch ($value){
					case 'accessdenied':$this->_worker_ = new TAccessDeniedPage($this->service,$this->Name(),"","");break;
					case 'notfound':$this->_worker_ = new TNotFoundPage($this->service,$this->Name(),"","");break;
				}
			}break;
			default:parent::__set($nm,$value);break;
		}
	}
	
	public function IsParentItem(TMSFrontPageItem $item){return false;}	
	
	public function SendHeaders(){
		$this->_worker_->SendHeaders();
		parent::SendHeaders();
	}
}